//
//  HZNetworkTool.h
//  HZTC_Stock
//
//  Created by MayerF on 17/3/16.
//  Copyright © 2017年 MayerF. All rights reserved.
//
//  ********************* 用单例对象来做旧代码的网络回调对象

/////////////////////////////////////////////////////////
//页面消失的时候，请取消订阅，避免内存泄漏
/////////////////////////////////////////////////////////

#import <Foundation/Foundation.h>

@interface HZNetworkTool : NSObject
+ (instancetype)shareNetworkTool;

+ (int)networkSubscribeDataWithapiType:(kHZApiType)apiType
                               success:(void(^)(id model, kHZApiType apiType))success;
+ (int)networkSubscribeDataWithapiType:(kHZApiType)apiType
                                  code:(NSString *)code
                                market:(int)market
                               success:(void(^)(id model, kHZApiType apiType))success;
+ (int)networkSubscribeDataWithapiType:(kHZApiType)apiType
                                  code:(NSString *)code
                                market:(int)market
                                 kType:(int)kType
                               success:(void(^)(id model, kHZApiType apiType))success;

+ (void)networkCacelSubscribeId:(int)Id;
+ (void)networkCacelAllSubscribeId;

//自选股相关
// 添加到本地
+ (int)networkAddOwnStock:(NSString *)code WithMarketId:(int)marketId;
+ (int)networkDeleteOwnStock:(NSString *)code WithMarketId:(int)marketId;
+ (void)networkDeleteAllOwnStock;
+ (NSArray *)networkGetAllOwnStock;
//获取是否自选股
+ (BOOL)networkIsOwnStock:(NSString *)code WithMarketId:(int)marketId;


+ (NSArray *)specialGetStocks;
+ (void)speicalAddOwnStock:(NSDictionary *)stock;
+ (void)speicalUpdateOwnStocks:(NSArray *)stocks;
@end
